package com.qfedu.buy.server.listener;

import com.qfedu.buy.common.config.RabbitMQConstantConfig;
import com.qfedu.buy.server.service.intf.SkillOrderService;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @program: NeighborBuy
 * @description:
 * @author: Feri(邢朋辉)
 * @create: 2021-02-05 14:57
 */
@Component
@RabbitListener(queues = RabbitMQConstantConfig.QUEUE_SKILL_ORDER_DTX)
public class SkillOrderTimeOutListener {
    @Autowired
    private SkillOrderService service;
    @RabbitHandler
    public void to(long oid){
        //查询数据库订单 校验订单状态 超时---
        service.ordertimeout(oid);
    }
}
